From f3adfa9dcb4df8c03fb0fd47e2b9d2bbc028bb1f Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Wed, 19 Oct 2005 13:37:16 +0100 Subject: [PATCH] Set the console limit for DomUs based on a value set in xend-config.sxp. Signed-off-by: Dan Smith Signed-off-by: Ewan Mellor --- tools/examples/xend-config.sxp | 3 +++ tools/python/xen/xend/XendDomainInfo.py | 2 +- tools/python/xen/xend/XendRoot.py | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/examples/xend-config.sxp b/tools/examples/xend-config.sxp index 1b6b8c52e1..75152f21db 100644 --- a/tools/examples/xend-config.sxp +++ b/tools/examples/xend-config.sxp @@ -20,6 +20,9 @@ # Specifying the empty string '' allows all connections. (console-address 'localhost') +# The limit (in kilobytes) on the size of the console buffer +(console-limit 1024) + ## Use the following if VIF traffic is routed. # The script used to start/stop networking for xend. #(network-script network-route) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 1e3d482a75..bb3088d500 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -594,7 +594,7 @@ class XendDomainInfo: to_store = { 'domid': str(self.domid), 'vm': self.vmpath, - + 'console/limit': str(xroot.get_console_limit() * 1024), 'memory/target': str(self.info['memory_KiB']) } diff --git a/tools/python/xen/xend/XendRoot.py b/tools/python/xen/xend/XendRoot.py index 85a13286dd..e88e8ff4b3 100644 --- a/tools/python/xen/xend/XendRoot.py +++ b/tools/python/xen/xend/XendRoot.py @@ -267,6 +267,9 @@ class XendRoot: def get_dom0_vcpus(self): return self.get_config_int('dom0-cpus', self.dom0_vcpus_default) + def get_console_limit(self): + return self.get_config_int('console-limit', 1024) + def instance(): """Get an instance of XendRoot. Use this instead of the constructor. -- 2.30.2